﻿<UserControl x:Class="Kokomo.PeInspector.PeModuleStringsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:pe="clr-namespace:Kokomo.PeInspector"
			 xmlns:ui="clr-namespace:Kokomo;assembly=Kokomo.UI"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
	<Grid>
		<pe:SearchView
			SearchTerm="{Binding SearchTerm}"
			IsSearching="{Binding IsSearching}"
			SearchProgress="{Binding SearchProgress}"
			>
			<ListView
				ItemsSource="{Binding Results}"
				ui:ListViewHelper.IsSortingEnabled="True"
				TextSearch.TextPath="String"
				>
				<ListView.View>
					<GridView>
						<GridViewColumn Header="RVA" Width="100" ui:ListViewHelper.SortPropertyName="Rva" DisplayMemberBinding="{Binding Rva, StringFormat={}0x{0:X8}}"/>
						<GridViewColumn Header="Address" Width="100" ui:ListViewHelper.SortPropertyName="Address" DisplayMemberBinding="{Binding Address, StringFormat={}0x{0:X8}}"/>
						<GridViewColumn Header="Section" ui:ListViewHelper.SortPropertyName="SectionName" DisplayMemberBinding="{Binding SectionName}"/>
						<GridViewColumn Header="Length" ui:ListViewHelper.SortPropertyName="Length" DisplayMemberBinding="{Binding Length}"/>
						<GridViewColumn Header="String" ui:ListViewHelper.SortPropertyName="String" Width="300" DisplayMemberBinding="{Binding}"/>
					</GridView>
				</ListView.View>
				<ListView.ItemContainerStyle>
					<Style TargetType="{x:Type ListViewItem}">
						<Setter Property="ContextMenuService.ContextMenu">
							<Setter.Value>
								<ContextMenu>
									<MenuItem Header="Copy Text" Command="{Binding CopyTextCommand}"/>
								</ContextMenu>
							</Setter.Value>
						</Setter>
					</Style>
				</ListView.ItemContainerStyle>
			</ListView>

		</pe:SearchView>
	</Grid>
</UserControl>
